package com.xliee.modules.sys.controller;

import com.xliee.modules.sys.entity.UserEntity;
import com.xliee.modules.sys.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lisongsong@xliee.com
 * @since 2024-08-27 14:34:11
 */
@Controller
@RequestMapping("/sys/user")
public class UserController {

    @Autowired
    IUserService userService;

    /**
     * 用户信息列表页
     *
     * @param model
     * @return
     */
    @RequestMapping("/getUserList")
    public String getUserList(Model model) {
        List<UserEntity> userList = userService.list();
        model.addAttribute("userList", userList);
        return "/user/userList";
    }

}
